package company.shenche;

import java.util.ArrayList;
import java.util.List;

public class Poker {
    private int number;

    private PokerType pt;

    public Poker(int number, PokerType pt) {
        this.number = number;
        this.pt = pt;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public PokerType getPt() {
        return pt;
    }

    public void setPt(PokerType pt) {
        this.pt = pt;
    }
}

enum PokerType {
    //黑桃 红心 梅花 方块
    spade, heart, club, diamond
}

class PokerUtil {

    List<Poker> pokerRule;

    public PokerUtil(List<Poker> pokerRule) {
        this.pokerRule = new ArrayList<>();
        pokerRule.add(new Poker(8, PokerType.heart));
        pokerRule.add(new Poker(6, PokerType.heart));
        pokerRule.add(new Poker(7, PokerType.heart));
        pokerRule.add(new Poker(9, PokerType.heart));
    }

    public boolean judgeCorrectPokerOrder(List<Poker> pokers) {
        int no = 0;
        for (Poker poker : pokers) {
            if (pokerRule.get(no).equals(poker))
                no++;
        }
        return no == pokers.size();
    }
}

